import request from "../utils/request";
export default {
  login(params) {
    return request({
      url: "/users/login",
      method: "post",
      data: params,
      mock:false
    });
  },
  noticeCount() {
    return request({
      url: "/leave/count",
      method: "get",
      mock: false,
    });
  },
  menuList() {
    return request({
      url: "/menu/list",
      method: "get",
      mock: false,
    });
  },
  userList(params) {
    return request({
      url: "/users/list",
      method: "get",
      data: params,
      mock: false,
    });
  },
  userDelete(params) {
    return request({
      url: "/users/delete",
      method: "post",
      data: params,
      mock: false,
    });
  },
  getRoleList(params) {
    return request({
      url: "/roles/List",
      method: "get",
      mock: false,
      data: params,
    });
  },
  getDeptList() {
    return request({
      url: "/dept/list",
      method: "get",
      mock: false,
    });
  },
  userSubmit(params) {
    return request({
      url: "/users/operate",
      method: "post",
      mock: false,
      data: params,
    });
  },
  menuSubmit(params){
     return request({
      url: "/menu/operate",
      method: "post",
      mock: false,
      data: params,
    });
  },
  roleList(){
    return request({
      url: "/roles/list",
      method: "get",
      mock: false,
    });
  },
    roleOperate(params){
     return request({
      url: "/roles/operate",
      method: "post",
      mock: false,
      data: params,
    });
  },
  updatePermission(params){
    return request({
      url: "/roles/update/permission",
      method: "post",
      mock: false,
      data: params,
    });
  }
};
